﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WAU.Models.Framework
{
    /// <summary>
    /// 通用基本模型
    /// </summary>
    public class BaseModel
    {
        /// <summary>
        /// 层级分隔符
        /// </summary>
        public const string HIERARCHY_SEPERATOR = "->";


        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        public string Id { get; set; }        

        ///// <summary>
        ///// 备注
        ///// </summary>
        //public string Remark { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string Creator { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新人（可为空）
        /// </summary>
        public string Modifier { get; set; }

        /// <summary>
        /// 更新时间（可为空）
        /// </summary>
        public DateTime? ModifyTime { get; set; }

        /// <summary>
        /// ctor
        /// </summary>
        public BaseModel()
        {
            CreateTime = DateTime.Now;
        }
    }
}
